package com.aihwcm.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Aihrelateddocs entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "aihrelateddocs", catalog = "aihwcmdb")
public class Aihrelateddocs implements java.io.Serializable {

	// Fields

	private Integer relatednewsid;
	private Aihdocuments aihdocuments;
	private Integer relateddocid;

	// Constructors

	/** default constructor */
	public Aihrelateddocs() {
	}

	/** full constructor */
	public Aihrelateddocs(Aihdocuments aihdocuments, Integer relateddocid) {
		this.aihdocuments = aihdocuments;
		this.relateddocid = relateddocid;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "relatednewsid", unique = true, nullable = false)
	public Integer getRelatednewsid() {
		return this.relatednewsid;
	}

	public void setRelatednewsid(Integer relatednewsid) {
		this.relatednewsid = relatednewsid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "docid")
	public Aihdocuments getAihdocuments() {
		return this.aihdocuments;
	}

	public void setAihdocuments(Aihdocuments aihdocuments) {
		this.aihdocuments = aihdocuments;
	}

	@Column(name = "relateddocid")
	public Integer getRelateddocid() {
		return this.relateddocid;
	}

	public void setRelateddocid(Integer relateddocid) {
		this.relateddocid = relateddocid;
	}

}